@import './var.less';

:global {
  .elux-window._dialog {
    > :local(.component-loading),
    > :local(.component-error) {
      width: 400px !important;
      height: 200px !important;
    }
  }

  .ant-descriptions-view .ant-descriptions-item-label {
    color: #666;
    white-space: nowrap;
  }

  :local(.component-loading) {
    position: relative;
    width: 100%;
    height: 100%;
    font-size: 0;

    &::before {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 24px;
      height: 24px;
      margin-top: -12px;
      margin-left: -12px;
      content: '';
      background: url('../imgs/loading48x48.gif') no-repeat;
      background-size: 24px 24px;
    }
  }

  :local(.component-error) {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 10px;
    font-size: 12px;
    color: red;
  }

  :local(.dialog-content) {
    margin: 20px 25px 25px;
  }

  :local(.page-content) {
    padding: 30px 30px 50px;
  }

  :local(.actions) {
    > * {
      display: inline-block;
      padding-right: 10px;
      margin-right: 10px;
      line-height: 1;
      border-right: 1px solid #ddd;

      &:last-child {
        margin-right: 0;
        border: none;
      }
    }
  }

  :local(.table-actions) {
    > * {
      margin: 0 5px;
    }
  }

  :local(.form-actions) {
    text-align: center;

    > * {
      margin: 0 6px;
    }
  }

  :local(.control) {
    display: flex;
    justify-content: space-between;

    .ant-btn {
      width: 100%;
      padding-right: 0;
      padding-left: 0;
    }

    > * {
      flex: 1;
      width: 100%;
      margin-left: 10px;

      &:first-child {
        margin-left: 0;
      }
    }
  }

  :local(.disable) {
    color: @warning-color;
  }

  :local(.enable) {
    color: @success-color;
  }
}
